<template>
  <div id="app" v-if="bol">
    <!-- <button @click="showMessage">调用消息</button> -->
    <!-- <XtxMessage></XtxMessage> -->
    <!-- <button @click="btnClick">测试</button> -->
    <router-view />
  </div>
</template>

<script>
// import XtxMessage from '@/components/Message/index.vue'
// import xtxMessage from '@/components/Message/message.js'
export default {
  name: 'App',
  components: {
    // XtxMessage
  },
  provide () {
    return {
      reload: this.reloadFn,
      fn: this.appFN
      // that: this
    }
  },
  data () {
    return {
      bol: true
    }
  },
  created () {
    // console.log(this.$router)
  },
  methods: {
    reloadFn () {
      this.bol = false
      this.$nextTick(() => {
        this.bol = true
      })
    },
    btnClick () {
      console.log('reload', this.reload)
    },
    appFN (str) {
      console.log(str)
    },
    showMessage () {
      // xtxMessage({
      //   type: 'error',
      //   text: '错误信息'
      // })
      this.$xtxmessage.error('错误信息测试')
      // this.$message.error()
      // this.$message.success()
    }
  }
}
</script>
<style lang="scss">
.spinner {
  display: none !important;
}
</style>
